# Clauses for the ontology:
trains-ontology(X):-car(X).
car-shape(X):-car-openshape(X).
trains-ontology(X):-trains-problem(X).
trains-ontology(X):-trains-description(X).
trains-ontology(X):-car-size(X).
trains-ontology(X):-load(X).
float(X):-float-interval(X).
any(X):-trains-ontology(X).
trains-ontology(X):-trains-solution(X).
car-shape(X):-car-closedshape(X).
trains-ontology(X):-car-shape(X).

# Clauses for the constants:
load(hexagonlod).
car-closedshape(closedrect).
trains-solution(east).
car-size(short).
car-closedshape(slopetop).
car-closedshape(ellipse).
car-closedshape(hexagon).
car-closedshape(engine).
car-openshape(dblopnrect).
car-openshape(openhex).
car-closedshape(jaggedtop).
car-openshape(ushaped).
car-openshape(openrect).
load(rectanglod).
car-openshape(opentrap).
load(trianglod).
load(circlelod).
boolean(false).
car-size(long).
boolean(true).
trains-solution(west).
integer(0).
integer(1).
integer(2).
integer(3).
integer(4).
integer(5).

# Clauses for case tr6
# description named t6
trains-problem(tr6-0).
description(tr6-0,tr6-9).
solution(tr6-0,west).
car(tr6-3).
infront(tr6-3,tr6-13).
loc(tr6-3,2).
nwhl(tr6-3,2).
ln(tr6-3,long).
cshape(tr6-3,closedrect).
npl(tr6-3,3).
lcont(tr6-3,circlelod).
lcont(tr6-3,circlelod).
lcont(tr6-3,circlelod).
car(tr6-6).
infront(tr6-6,tr6-3).
loc(tr6-6,1).
nwhl(tr6-6,2).
ln(tr6-6,long).
cshape(tr6-6,engine).
npl(tr6-6,0).
trains-description(tr6-9).
ncar(tr6-9,3).
cars(tr6-9,tr6-6).
cars(tr6-9,tr6-3).
cars(tr6-9,tr6-13).
car(tr6-13).
loc(tr6-13,3).
nwhl(tr6-13,2).
ln(tr6-13,short).
cshape(tr6-13,openrect).
npl(tr6-13,1).
lcont(tr6-13,trianglod).

# Clauses for case tr2
# description named t2
trains-problem(tr2-0).
description(tr2-0,tr2-12).
solution(tr2-0,east).
car(tr2-10).
loc(tr2-10,4).
nwhl(tr2-10,2).
ln(tr2-10,short).
cshape(tr2-10,closedrect).
npl(tr2-10,2).
lcont(tr2-10,circlelod).
lcont(tr2-10,circlelod).
trains-description(tr2-12).
ncar(tr2-12,4).
cars(tr2-12,tr2-20).
cars(tr2-12,tr2-15).
cars(tr2-12,tr2-19).
cars(tr2-12,tr2-10).
car(tr2-15).
infront(tr2-15,tr2-19).
loc(tr2-15,2).
nwhl(tr2-15,2).
ln(tr2-15,short).
cshape(tr2-15,ushaped).
npl(tr2-15,1).
lcont(tr2-15,trianglod).
car(tr2-19).
infront(tr2-19,tr2-10).
loc(tr2-19,3).
nwhl(tr2-19,2).
ln(tr2-19,short).
cshape(tr2-19,opentrap).
npl(tr2-19,1).
lcont(tr2-19,rectanglod).
car(tr2-20).
infront(tr2-20,tr2-15).
loc(tr2-20,1).
nwhl(tr2-20,2).
ln(tr2-20,long).
cshape(tr2-20,engine).
npl(tr2-20,0).

# Clauses for case tr10
# description named t10
trains-problem(tr10-0).
description(tr10-0,tr10-2).
solution(tr10-0,west).
trains-description(tr10-2).
ncar(tr10-2,3).
cars(tr10-2,tr10-14).
cars(tr10-2,tr10-12).
cars(tr10-2,tr10-11).
car(tr10-11).
loc(tr10-11,3).
nwhl(tr10-11,3).
ln(tr10-11,long).
cshape(tr10-11,closedrect).
npl(tr10-11,2).
lcont(tr10-11,rectanglod).
lcont(tr10-11,rectanglod).
car(tr10-12).
infront(tr10-12,tr10-11).
loc(tr10-12,2).
nwhl(tr10-12,2).
ln(tr10-12,short).
cshape(tr10-12,ushaped).
npl(tr10-12,1).
lcont(tr10-12,rectanglod).
car(tr10-14).
infront(tr10-14,tr10-12).
loc(tr10-14,1).
nwhl(tr10-14,2).
ln(tr10-14,long).
cshape(tr10-14,engine).
npl(tr10-14,0).

# Clauses for case tr3
# description named t3
trains-problem(tr3-0).
description(tr3-0,tr3-6).
solution(tr3-0,east).
trains-description(tr3-6).
ncar(tr3-6,4).
cars(tr3-6,tr3-16).
cars(tr3-6,tr3-17).
cars(tr3-6,tr3-19).
cars(tr3-6,tr3-12).
car(tr3-12).
loc(tr3-12,4).
nwhl(tr3-12,3).
ln(tr3-12,long).
cshape(tr3-12,closedrect).
npl(tr3-12,1).
lcont(tr3-12,trianglod).
car(tr3-16).
infront(tr3-16,tr3-17).
loc(tr3-16,1).
nwhl(tr3-16,2).
ln(tr3-16,long).
cshape(tr3-16,engine).
npl(tr3-16,0).
car(tr3-17).
infront(tr3-17,tr3-19).
loc(tr3-17,2).
nwhl(tr3-17,2).
ln(tr3-17,short).
cshape(tr3-17,openrect).
npl(tr3-17,1).
lcont(tr3-17,circlelod).
car(tr3-19).
infront(tr3-19,tr3-12).
loc(tr3-19,3).
nwhl(tr3-19,2).
ln(tr3-19,short).
cshape(tr3-19,hexagon).
npl(tr3-19,1).
lcont(tr3-19,trianglod).

# Clauses for case tr9
# description named t9
trains-problem(tr9-0).
description(tr9-0,tr9-17).
solution(tr9-0,west).
car(tr9-8).
infront(tr9-8,tr9-19).
loc(tr9-8,4).
nwhl(tr9-8,2).
ln(tr9-8,short).
cshape(tr9-8,openrect).
npl(tr9-8,1).
lcont(tr9-8,rectanglod).
car(tr9-9).
infront(tr9-9,tr9-13).
loc(tr9-9,1).
nwhl(tr9-9,2).
ln(tr9-9,long).
cshape(tr9-9,engine).
npl(tr9-9,0).
car(tr9-10).
infront(tr9-10,tr9-8).
loc(tr9-10,3).
nwhl(tr9-10,2).
ln(tr9-10,long).
cshape(tr9-10,jaggedtop).
npl(tr9-10,1).
lcont(tr9-10,rectanglod).
car(tr9-13).
infront(tr9-13,tr9-10).
loc(tr9-13,2).
nwhl(tr9-13,2).
ln(tr9-13,short).
cshape(tr9-13,opentrap).
npl(tr9-13,1).
lcont(tr9-13,circlelod).
trains-description(tr9-17).
ncar(tr9-17,5).
cars(tr9-17,tr9-9).
cars(tr9-17,tr9-13).
cars(tr9-17,tr9-10).
cars(tr9-17,tr9-8).
cars(tr9-17,tr9-19).
car(tr9-19).
loc(tr9-19,5).
nwhl(tr9-19,2).
ln(tr9-19,short).
cshape(tr9-19,opentrap).
npl(tr9-19,1).
lcont(tr9-19,circlelod).

# Clauses for case tr4
# description named t4
trains-problem(tr4-0).
description(tr4-0,tr4-21).
solution(tr4-0,east).
car(tr4-1).
loc(tr4-1,5).
nwhl(tr4-1,2).
ln(tr4-1,short).
cshape(tr4-1,openrect).
npl(tr4-1,1).
lcont(tr4-1,rectanglod).
car(tr4-13).
infront(tr4-13,tr4-20).
loc(tr4-13,3).
nwhl(tr4-13,2).
ln(tr4-13,short).
cshape(tr4-13,dblopnrect).
npl(tr4-13,1).
lcont(tr4-13,trianglod).
car(tr4-14).
infront(tr4-14,tr4-15).
loc(tr4-14,1).
nwhl(tr4-14,2).
ln(tr4-14,long).
cshape(tr4-14,engine).
npl(tr4-14,0).
car(tr4-15).
infront(tr4-15,tr4-13).
loc(tr4-15,2).
nwhl(tr4-15,2).
ln(tr4-15,short).
cshape(tr4-15,opentrap).
npl(tr4-15,1).
lcont(tr4-15,trianglod).
car(tr4-20).
infront(tr4-20,tr4-1).
loc(tr4-20,4).
nwhl(tr4-20,2).
ln(tr4-20,short).
cshape(tr4-20,ellipse).
npl(tr4-20,1).
lcont(tr4-20,rectanglod).
trains-description(tr4-21).
ncar(tr4-21,5).
cars(tr4-21,tr4-14).
cars(tr4-21,tr4-15).
cars(tr4-21,tr4-13).
cars(tr4-21,tr4-20).
cars(tr4-21,tr4-1).

# Clauses for case tr7
# description named t7
trains-problem(tr7-0).
description(tr7-0,tr7-18).
solution(tr7-0,west).
car(tr7-11).
infront(tr7-11,tr7-12).
loc(tr7-11,1).
nwhl(tr7-11,2).
ln(tr7-11,long).
cshape(tr7-11,engine).
npl(tr7-11,0).
car(tr7-12).
infront(tr7-12,tr7-14).
loc(tr7-12,2).
nwhl(tr7-12,2).
ln(tr7-12,short).
cshape(tr7-12,dblopnrect).
npl(tr7-12,1).
lcont(tr7-12,circlelod).
car(tr7-14).
infront(tr7-14,tr7-15).
loc(tr7-14,3).
nwhl(tr7-14,2).
ln(tr7-14,short).
cshape(tr7-14,ushaped).
npl(tr7-14,1).
lcont(tr7-14,trianglod).
car(tr7-15).
loc(tr7-15,4).
nwhl(tr7-15,2).
ln(tr7-15,long).
cshape(tr7-15,jaggedtop).
npl(tr7-15,0).
trains-description(tr7-18).
ncar(tr7-18,4).
cars(tr7-18,tr7-11).
cars(tr7-18,tr7-12).
cars(tr7-18,tr7-14).
cars(tr7-18,tr7-15).

# Clauses for case tr8
# description named t8
trains-problem(tr8-0).
description(tr8-0,tr8-13).
solution(tr8-0,west).
car(tr8-8).
infront(tr8-8,tr8-9).
loc(tr8-8,1).
nwhl(tr8-8,2).
ln(tr8-8,long).
cshape(tr8-8,engine).
npl(tr8-8,0).
car(tr8-9).
infront(tr8-9,tr8-12).
loc(tr8-9,2).
nwhl(tr8-9,3).
ln(tr8-9,long).
cshape(tr8-9,closedrect).
npl(tr8-9,1).
lcont(tr8-9,rectanglod).
car(tr8-12).
loc(tr8-12,3).
nwhl(tr8-12,2).
ln(tr8-12,short).
cshape(tr8-12,ushaped).
npl(tr8-12,1).
lcont(tr8-12,circlelod).
trains-description(tr8-13).
ncar(tr8-13,3).
cars(tr8-13,tr8-8).
cars(tr8-13,tr8-9).
cars(tr8-13,tr8-12).

# Clauses for case tr1
# description named t1
trains-problem(tr1-0).
description(tr1-0,tr1-4).
solution(tr1-0,east).
trains-description(tr1-4).
ncar(tr1-4,5).
cars(tr1-4,tr1-21).
cars(tr1-4,tr1-18).
cars(tr1-4,tr1-17).
cars(tr1-4,tr1-22).
cars(tr1-4,tr1-19).
car(tr1-17).
infront(tr1-17,tr1-22).
loc(tr1-17,3).
nwhl(tr1-17,2).
ln(tr1-17,short).
cshape(tr1-17,slopetop).
npl(tr1-17,1).
lcont(tr1-17,trianglod).
car(tr1-18).
infront(tr1-18,tr1-17).
loc(tr1-18,2).
nwhl(tr1-18,3).
ln(tr1-18,long).
cshape(tr1-18,openrect).
npl(tr1-18,3).
lcont(tr1-18,rectanglod).
lcont(tr1-18,rectanglod).
lcont(tr1-18,rectanglod).
car(tr1-19).
loc(tr1-19,5).
nwhl(tr1-19,2).
ln(tr1-19,long).
cshape(tr1-19,openrect).
npl(tr1-19,1).
lcont(tr1-19,circlelod).
car(tr1-21).
infront(tr1-21,tr1-18).
loc(tr1-21,1).
nwhl(tr1-21,2).
ln(tr1-21,long).
cshape(tr1-21,engine).
npl(tr1-21,0).
car(tr1-22).
infront(tr1-22,tr1-19).
loc(tr1-22,4).
nwhl(tr1-22,3).
ln(tr1-22,long).
cshape(tr1-22,openrect).
npl(tr1-22,1).
lcont(tr1-22,hexagonlod).

# Clauses for case tr5
# description named t5
trains-problem(tr5-0).
description(tr5-0,tr5-15).
solution(tr5-0,east).
car(tr5-3).
infront(tr5-3,tr5-12).
loc(tr5-3,1).
nwhl(tr5-3,2).
ln(tr5-3,long).
cshape(tr5-3,engine).
npl(tr5-3,0).
car(tr5-12).
infront(tr5-12,tr5-18).
loc(tr5-12,2).
nwhl(tr5-12,2).
ln(tr5-12,short).
cshape(tr5-12,dblopnrect).
npl(tr5-12,1).
lcont(tr5-12,trianglod).
trains-description(tr5-15).
ncar(tr5-15,4).
cars(tr5-15,tr5-3).
cars(tr5-15,tr5-12).
cars(tr5-15,tr5-18).
cars(tr5-15,tr5-16).
car(tr5-16).
loc(tr5-16,4).
nwhl(tr5-16,2).
ln(tr5-16,short).
cshape(tr5-16,closedrect).
npl(tr5-16,1).
lcont(tr5-16,circlelod).
car(tr5-18).
infront(tr5-18,tr5-16).
loc(tr5-18,3).
nwhl(tr5-18,3).
ln(tr5-18,long).
cshape(tr5-18,closedrect).
npl(tr5-18,1).
lcont(tr5-18,rectanglod).
